#ifndef _DD_SPLINE2_H_
#define _DD_SPLINE2_H_

#include "dd_base_2d.h"
#include "math/spline2d.h"

namespace dd 
{
///////////////////////////////////////////////////////
///	\brief	Base class for debug shapes
///////////////////////////////////////////////////////
class Spline2 : public PrimitiveBase2D
{
public:
    /**
     * Initialize class
     */
					Spline2();

    /**
     * Destroy class
     */
	virtual			~Spline2();

    /**
     * Render to buffer
     * @param   _pBuffer    Buffer to render into
     */
	virtual void	Render(DBG_BUFFER_2D* _pBuffer);

    /**
     * Setup primitive
     * @param _pSpline      Spline2 to visualize
     * @param _dT           Delta between steps (number of segments = (Spline2 total time / dT)
     * @param _Color        Set the colour of the sphere
     * @param _Arrow        Draw an arrow-head at destination ?
     */
    void	Setup(math::SplineCache2D* _pSpline, float _dT = 0.01f, COLOR _Color = ColorRGBA(255, 255, 255), bool _Knots = false, const math::Vec2& Offset = math::Vec2(0,0));
private:
	math::Vec2				m_Offset;
	math::SplineCache2D*	m_pSpline;      /// spline to visualize
	float					m_dT;           /// Delta between steps (number of segments = (Spline2 total time / dT)
	bool					m_Knots;        /// Draw the knots in the spline

};

}// End namespace dd


#endif //_DD_SPLINE2_H_